Humans tend to organize information in categories. The categories in which information is organized are themselves typically organized relative to each other in some form of hierarchy. For example, an individual animal belongs to a species, the species belongs to a genus, the genus belongs to a family, the family belongs to an order, and the order belongs to a class.
With the advent of computer systems, techniques for storing electronic information have been developed that largely reflected this human desire for hierarchical organization. Conventional operating systems, for example, provide file systems that use hierarchy-based organization principles. Specifically, a typical operating system file system (“OS file system”) has folders arranged in a hierarchy, and documents stored in the folders. Ideally, the hierarchical relationships between the folders reflect some intuitive relationship between the meanings that have been assigned to the folders. Similarly, it is ideal for each document to be stored in a folder based on some intuitive relationship between the contents of the document and the meaning assigned to the folder in which the document is stored.
Recently, techniques have been developed to use a relational database to store files that have traditionally been stored in OS file systems. By storing the files in a relational database, the files may be accessed by issuing database commands to a database server. In many circumstances, retrieving and manipulating files by issuing database commands can be much more efficient than by issuing file system commands due to the enhanced functionality of database servers. One system in which a relational database is used as the back end of a file system is described in U.S. patent application Ser. No. 09/571,508, entitled “Multi-Model Access to Data”, filed on May 15, 2000 by Eric Sedlar, the entire contents of which are incorporated herein by this reference. In the Sedlar system, the files are accessible both (1) by making calls to conventional file system APIs, and (2) by issuing queries to the database server.
A transaction is an “all or nothing” unit of work. Changes made by operations that belong to a transaction are not made permanent until all changes in the transaction are successfully made and the transaction commits. If any operation within a transaction fails, then all changes made by the transaction are undone. The removal of changes made by a transaction is referred to as a “rollback” operation.
When an OS file system is implemented using a relational database system, a series of file system operations may be performed as a transaction within the database system. Techniques for performing file system operations as a transaction are described in U.S. patent application Ser. No. 09/571,496, entitled “File System that Supports Transactions”, filed on May 15, 2000, by Eric Sedlar, the entire contents of which are incorporated herein by this reference.
One of the difficult problems associated with using a database as part of a file system is the performance overhead of accessing the database every time information about files that are stored in the file system is required. Such information about files is generally referred to as the file system “metadata”. Examples of metadata associated with files are: (1) a document's name, creation date, last modified date (2) permissions for accessing the document, and (3) the folder path for accessing the document.
Furthermore, in a file system that supports transactions, the “metadata” that is supplied to an entity needs to be based on the context of that entity. For example, if a first entity is in the middle of a transaction that has changed the filename of a file, the first entity should be supplied the new filename even though the transaction has not yet completed. However, a second entity that is not involved in that transaction should be supplied the old filename, since the transaction that changed the filename has not yet committed.
Based on the foregoing, it is clearly desirable to provide techniques that reduce the overhead associated with accessing a database to retrieve metadata associated with files that are stored within a database system.